package com.kfy.rxjavademo;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {

    ImageView imageView;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        initView();
        test();
    }

    private void test() {
        RxJava.testDemo5(this);
        RxJava.testDemo6();
        RxJava.testDemo7(this);
    }

    private void initView() {
        imageView = findViewById(R.id.imageView);
    }

    public void showImage(Drawable drawable) {
        imageView.setImageDrawable(drawable);
    }
}